package com.ujiuye.Service.impl;

import com.ujiuye.Service.ManagerService;
import com.ujiuye.demo.impl.ManagerDaoImpl;
import com.ujiuye.entity.Manager;

public class ManagerServiceImpl implements ManagerService {
    ManagerDaoImpl md = new ManagerDaoImpl();

    public boolean login(String username, String password) {
        Manager manager = md.login(username, password);
        boolean res = true;
        if (manager == null) {
            res = false;
        }
        return res;
    }

    public boolean register(String username, String password) {
        int rows = md.register(username, password);
        boolean res = true;
        if (rows == 0) {
            res = false;
        }
        return res;
    }
}
